package com.cqw.controller;

import com.cqw.service.RewardPoolService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: caoqingwen
 * @CreateTime: 2021-04-15 22:05
 * @Description:
 */
@RestController
@RequestMapping("/lottery")
@Slf4j
public class LotteryController {


    @Autowired
    private RewardPoolService rewardPoolService;


    @GetMapping("/lottery")
    public Integer lottery() throws Exception {
        return rewardPoolService.doLottery();
    }


    @GetMapping("/info")
    public String info() {
        return rewardPoolService.getInfo();
    }

}
